<!doctype html>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<%
	String path = request.getContextPath();
	String basePath ="";
	if("80".equals(request.getServerPort())){
		 basePath = request.getScheme() + "://" + request.getServerName()  + path + "/";
	}else{
		 basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	}
%>
<html>
	<head>
	    <meta charset="utf-8" />
		<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
		<meta content="yes" name="apple-mobile-web-app-capable">
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta name="format-detection" content="telephone=no">
		<title>welcome</title>
	    <style type="text/css">
			html,body {margin:0px;height:100%; background:#FFF;}
			*html{background-image:url(about:blank);background-attachment:fixed;}
			img {border:0;outline:none;}
			a{ text-decoration: none; color:#4a4a4a; outline:none;}
			a:hover{text-decoration:none; color:#666; outline:none;}
			body{font-family:"microsoft yahei";font-size:14px;line-height: 20px; color:#4a4a4a;}
			.loadingBox{position:absolute;top:50%;left:50%;margin-left:-45px;margin-top:-50px;text-align:center;}
			.loading{width:50px;height:50px;background:url(${root}/skins/images/loading.png) top left no-repeat;background-size:50px 50px;margin:0 auto;}
		</style>
		<script src="${root}/common/js/jquery-2.1.1.min.js"></script>
		<script type="text/javascript" src="${root}/common/js/WXUtil.js"></script>
        <script type="text/javascript">
			WXUtil.setPrefix("${root}");
			//WXUtil.hideOptionMenu();
			var url=window.location.href;
			$(document).ready(function(){

				var code = WXUtil.getUrlParam("code");
				if(code == null || code==undefined){
					WXUtil.toGetWxUser("1",url);
				}else{
					WXUtil.getWxUser("1",function(data) {
						//alert('openId:' + data.openid + ",nickname:" + data.nickname);
						window.location.href = "${root}/wap/wxtest/share/?openid="+data.openid+"&nickname=" + data.nickname + "&headimg=" + data.headimgurl ;
					});
				}

			});
         </script>
	</head>
    <body>
     <div class="loadingBox">
			<div class="loading"></div>
			<p>正在加载,请稍候......</p>
		</div>
	</body>
</html>